mixin remove-action
  - var hide = repliesCounter && !user.staff ? 'hide' : ''
  a.comment-action.link-remove.btn-remove(href="#", title=t('comment-card.remove-argument'), class=hide)
    i.icon-remove

li.media.comment-item(class=classes)
  span.pull-left
    img.avatar(src=avatar, title=comment.author.displayName)

  .media-body
    h4.media-heading(title=comment.author.displayName)
      | #{comment.author.fullName}
      small.ago(data-time=comment.createdAt.toString())
      - if (comment.editedAt)
        small.edited · #{t('comments.edited')}
      - if (own)
        +remove-action
        a.comment-action.link-edit.btn-edit(href="#", title=t('comments.edit.argument'))
          i.icon-pencil
      - else if (user.logged())
        - if (user.staff)
          +remove-action
        - var spamTitle = flags ?  t('comment-card.not-spam') : t('comment-card.report-spam')
        - if (canComment)
          a.comment-action.link-report.flag(href="#", title=spamTitle, class=flags ? 'selected' : '')
            i.glyphicon.glyphicon-flag
            span.count=comment.flags.length ? comment.flags.length : ''
    .comment-body
      .comment-text!=markdown(comment.text)
      - if (own || user.staff)
        .oncomment.remove-comment= t('comments.arguments.confirm-remove')
          -if (!own && user.staff)
            br
            =t('comments.removing-argument')
          .remove-confirm-actions
            a.confirm-remove(href='#')= t('common.ok')
            a.cancel-remove(href='#')= t('common.cancel')
      .oncomment.message
      p.spam-message=t('comment-card.flagged-as-spam')
        | .
        span.show-spam: a(href="#")= t('comment-card.show')
      .comment-actions
        - if (repliesCounter || user.id)
          - var title = repliesCounter + ' ' + (repliesCounter > 1 ? t('comments.replies') : t('comments.reply'))
          a.comment-action.comment-reply.pull-right(href='#', title=title.toLowerCase())
            span.reply-counter= repliesCounter > 0 ? repliesCounter : ''
          a.comment-action.comment-reply.pull-right(href='#', title=t('comments.reply-to-argument'))
            i.icon-reply
      .error.alert.alert-warning(data-error)
      .oncomment.loginrequired
        =t('comments.sign-in-required-to-vote-comments')
        |.
        a(href='/signin')= t('signin.login')
        |  #{t('common.or')}
        a(href='/signup')= t('signin.signup')
        |.

  .replies-container